package com.jeff.tianti.controller.channel;

import com.jeff.tianti.cms.service.AwardDescriptionService;
import com.jeff.tianti.common.dto.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

/**
 * @author NOW_GO
 * @desc AwardDescriptionController
 * @date 2019-07-15
 */
@RestController
@RequestMapping("/channel/awardDescription")
@CrossOrigin(maxAge = 3600)
public class AwardDescriptionController {

    @Autowired
    private AwardDescriptionService awardDescriptionService;

    @RequestMapping(value = "/detail", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public AjaxResult list(@RequestParam(value = "code") String code) {
        return AjaxResult.setSuccessData(awardDescriptionService.findByCode(code));
    }


}